:root {
    color-scheme: dark;
    font-family: "Segoe UI", "PingFang SC", sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: radial-gradient(circle at top, #1e293b, #0f172a 45%, #030712);
    color: #e2e8f0;
    min-height: 100vh;
}

.page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px 48px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 20px;
    padding: 24px 28px;
    box-shadow: 0 20px 60px rgba(2, 6, 23, 0.6);
}

.hero h1 {
    margin: 4px 0 12px;
    font-size: 28px;
}

.subtitle {
    margin: 0;
    color: #94a3b8;
    max-width: 640px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    padding: 2px 12px;
    border-radius: 999px;
    font-size: 13px;
    margin: 0;
}

.hero-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.upload-btn span,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 26px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    border: none;
}

.upload-btn span {
    background: linear-gradient(135deg, #38bdf8, #6366f1);
    color: white;
    box-shadow: 0 10px 35px rgba(79, 70, 229, 0.4);
}

.ghost-btn {
    background: transparent;
    color: #cbd5f5;
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 24px;
    min-height: 600px;
}

.panel {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 24px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 20px 40px rgba(2, 6, 23, 0.65);
    backdrop-filter: blur(10px);
}

.panel h2,
.panel h3 {
    margin: 0;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.8);
}

.label {
    margin: 0;
    font-size: 13px;
    color: #94a3b8;
}

.value {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.muted {
    color: #818cf8;
    font-weight: 500;
}

.dropzone {
    border: 1px dashed rgba(148, 163, 184, 0.4);
    border-radius: 18px;
    padding: 24px;
    text-align: center;
    background: rgba(30, 41, 59, 0.5);
    color: #cbd5f5;
    transition: border-color 0.2s, transform 0.2s;
}

.dropzone.dragover {
    border-color: #38bdf8;
    transform: translateY(-2px);
}

.dropzone .icon {
    font-size: 28px;
    margin-bottom: 6px;
}

.divider {
    height: 1px;
    background: rgba(148, 163, 184, 0.2);
    margin: 4px 0;
}

.control {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
    color: #cbd5f5;
}

.control input[type="range"],
.control select {
    width: 100%;
}

.control select {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: inherit;
    border-radius: 10px;
    padding: 8px 12px;
}

.control.checkbox {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.control small {
    color: #94a3b8;
    font-size: 12px;
}

.viewport {
    position: relative;
    background: rgba(15, 23, 42, 0.7);
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: inset 0 0 40px rgba(2, 6, 23, 0.65);
}

#viewer {
    width: 100%;
    height: 100%;
    border-radius: 24px;
    display: block;
}

.status {
    position: absolute;
    left: 24px;
    bottom: 24px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 999px;
    padding: 6px 16px;
    font-size: 13px;
    letter-spacing: 0.02em;
}

@media (max-width: 960px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .panel {
        order: 2;
    }

    .viewport {
        height: 520px;
        order: 1;
    }
}
